<?php
	$setting = Mage::helper('wishcartsettings');
	$check = $setting->getGeneral_DisableFrontendVariation();
?>
<?php if($check != 1) : ?>
<div class="qrcode hide-lte0">
	<ul id="qr_code">
		<li class="qr_code_name">
            <a href="javascript:void(0)">
                <span>qrcode</span>
                <img style="display: none;" src="<?php echo $this->getSkinUrl('images/media/demo/qrcode-demo-wishcart.png'); ?>" alt="" title="" />
            </a>
        </li>
	</ul>
</div>
<script type="text/javascript">
    jQuery(window).load(function () {        
        jQuery('#qr_code .qr_code_name a').mouseover(function(e) {
    		var $img = jQuery('img', this);            
            $img.css({
    			'display': 'block'
    		}).attr('src', $img.data('originalImg'));            
    	
    		var parent = $img.offsetParent().offset();
    		//var left = e.pageX - parent.left + 15;
    		var top = e.pageY - parent.top + 15;
    		
    		if (parent.top + top + $img.height() > jQuery(document).scrollTop() + jQuery(window).height())
    			top = jQuery(document).scrollTop() + jQuery(window).height() - $img.height() - parent.top;
    			
    		if (parent.top + top < jQuery(document).scrollTop())
    			top = jQuery(document).scrollTop() - parent.top;
    				
    		//if (parent.left + left + $img.width() > jQuery(document).scrollLeft() + jQuery(window).width())
    			//left = e.pageX - parent.left - $img.width() - 15;
    			
    		
    		$img.css({
    			'left': 48 + 'px',
                'position': 'absolute',
    			'top': 0 + 'px',
    			'width': 'auto',
    			'height': 'auto'
    		}).attr('src', $img.data('originalImg'));
    	});
        
        jQuery('#qr_code .qr_code_name a').mouseout(function(e) {
            var $img = jQuery('img', this);
            $img.css({
    			'display': 'none'
    		}).attr('src', $img.data('originalImg'));
        });
	});
</script>
<?php endif;?>